package com.hbk.context.controller;


import com.hbk.commom.utils.R;
import com.hbk.context.entity.BlType;
import com.hbk.context.service.BlTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 帖子类型表 前端控制器
 * </p>
 *
 * @author 嘟嘟爱萌喵
 * @since 2021-04-11
 */
@RestController
@RequestMapping("/context/type")
@CrossOrigin
public class BlTypeController {
    @Autowired
    BlTypeService typeService;
    @GetMapping("list")
    public R listAll(){
        List<BlType> typeList = typeService.listAll();
        return R.ok().data("typeList",typeList);
    }

    @GetMapping("getTypeMap")
    public R getTypeMap(){
        return R.ok();
    }

}

